#include <57header.h>

/* Usage: ./05_write filename */
int main(int argc, char *argv[]){
    ARGS_CHECK(argc, 2);
    int fd = open(argv[1], O_RDWR | O_CREAT | O_TRUNC, 0666);
    ERROR_CHECK(fd, -1, "open");
    char str[] = "123";
    int ret = write(fd, str, sizeof(str)-1);
    ERROR_CHECK(ret, -1, "write");
    close(fd);
    return 0;
}

